
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="<?php echo __PUBLIC__?>/Admin/Flat/img/favicon.ico">
	    <script type="text/javascript" src="<?php echo __PUBLIC__?>/uploadify/jquery-1.8.2.min.js"></script>
        <script type="text/javascript" src="<?php echo __PUBLIC__?>/uploadify/jquery.uploadify.min.js"></script>
         <link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__?>/uploadify/uploadify.css">
         <link rel="stylesheet" href="<?php echo __PUBLIC__?>/hdjs/hdjs.css" />
         <script type="text/javascript" src="<?php echo __PUBLIC__?>/hdjs/hdjs.min.js"></script>
	
</head>
<style type="text/css">
	*{
		font-size: 15px;
	}
	th{
		text-align: center;
	}
</style>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">
	<a href="javascript:;" class="btn btn-block  btn-primary">货品列表</a><br />

	<form action="" method="post">		
		<table class='table table-bordered table-hover'>
			<tr>
				<th>货品ID</th>
			<?php foreach ($arr as $k=>$v){?>
				<th><?php echo $k?></th>
			<?php }?>
				<th>库存</th>
				<th>货号</th>
				<th>操作</th>
			</tr>
			<?php foreach ($goodsListData as $v){?>
			<tr class="info">
					<td><?php echo $v['glid']?></td>
					<td><?php echo $v['gtvalue']['0']?></td>
					<td><?php echo $v['gtvalue']['1']?></td>
					<td><?php echo $v['inventory']?></td>
					<td><?php echo $v['number']?></td>

					<td>
			<a href="<?php echo U('GoodsList/edit',array('glid'=>$v['glid'],'goods_gid'=>$v['goods_gid']))?>" class="btn btn-warning"><i class="icon-pencil icon-white"></i>修改</a>
						<a href="javascript:;" class="btn btn-danger" onclick="if(confirm('确定删除吗？？') ) location.href='<?php echo U('GoodsList/del',array('glid'=>$v['glid']))?>'"><i class="icon-trash icon-white"></i>删除</a>
					</td>


			</tr>
			<?php }?>
			<tr class="info">
				<td>添加货品</td>
				<!-- 商品规格 -->
					<!-- 颜色 尺码-->
					<?php foreach ($arr as $v){?>
					<td>
						<select name="combine[]" >
							<option value="0">-请选择-</option>
							<!-- value=对应的商品属性里面的规格ID ,,,gtvalue对应的商品的规格值-->
							<?php foreach ($v as $vv){?>
							<option value="<?php echo $vv['gtid']?>"><?php echo $vv['gtvalue']?></option>

							<?php }?>
						</select>
					
					</td>

					<?php }?>
					<!-- 商品库存 -->
					<td>
						<input type="text" name='inventory' value="10000" />
					</td>
					<!-- 商品货号 -->
					<td>
						<input type="text" name='number' value="000001" />
					</td>
				<td></td>
			</tr>		
			</table>
			<input type="hidden" name="goods_gid" value="<?php echo Q('get.gid')?>" />
		<input type="submit" value='确定添加' class="btn  btn-primary"/>
	</form>
	</div>
	</div>
	</div>
</body>
</html>